'use strict';

// app/router/news.js
module.exports = app => {
  const router = app.router;

  router.post('/api/user/create', app.controller.user.create);
  router.get('/api/user/code/:phone', app.controller.user.loginCode);
  router.post('/api/user/login', app.controller.user.login);
  router.post('/api/user/:id', app.controller.user.update);
  router.get('/api/user/:id', app.controller.user.info);


  router.resources('/api/activites', app.controller.activites);


  router.get('/api/activity', app.controller.activites.index);
  router.get('/api/activity/:page/:size', app.controller.activites.query);
  router.get('/api/activity/:id', app.controller.activites.info);


  router.post('/api/activity/create', app.controller.activites.create);
  router.post('/api/activity/edit', app.controller.activites.eidt);
  router.post('/api/activity/del', app.controller.activites.destroy);


};

